from turtle import Turtle
STARTING_POSITION = (0, -280)
MOVE_DISTANCE = 10
FINISH_LINE_Y = 280


class Player(Turtle):
    def __init__(self):
        super().__init__()
        self.penup()
        self.shape("turtle")
        self.go_to_start()
        self.setheading(90)
        self.is_finished = False

    def go_up(self):
        """move player forward and return true if reaches """
        y = self.ycor()
        if y < FINISH_LINE_Y:
            self.forward(MOVE_DISTANCE)
        else:
            self.is_finished = True

    def go_to_start(self):
        self.is_finished = False
        self.goto(STARTING_POSITION)

